<template>
  <van-cell :title="name" :label="`${author} - ${name}`" center>
    <template #right-icon>
      <van-icon name="play-circle-o" size="0.7rem" @click="palyFn" />
    </template>
  </van-cell>
</template>

<script>
export default {
  props: {
    name: String,
    author: String,
    id: Number,
  },
  methods: {
    palyFn() {
      this.$router.push({
        path: "/play",
        query: {
          id: this.id,
        },
      });
    },
  },
};
</script>

<style>
/* 单元格设置底部边框 */
.van-cell {
  border-bottom: 1px solid lightgray;
}
</style>